package biz.innovasoft.nodb.transaction;

import java.util.Date;

import org.prevayler.Query;

import biz.innovasoft.nodb.impl.GenericRepository;

public class GetByOidQuery implements Query {

	private final Object data;
	
	public GetByOidQuery (Object data) {
		this.data = data;
	}
	
	@Override
	public Object query(Object prevalentSystem, Date time) throws Exception {
		GenericRepository repository = (GenericRepository)prevalentSystem;
		return repository.getByOId((Long)data, true);
	}

}
